<?php
$vars = parse_ini_file("../ini/settings.ini");
$connect = mysql_connect($vars["mysql_host"],$vars["mysql_username"],$vars["mysql_password"]) or die(mysql_error());
$db = mysql_select_db($vars["mysql_database"],$connect);

$id = $_POST['id'];

$sql = "SELECT nottvdb from recording_shows where id=\"$id\"";
$result = mysql_query($sql,$connect) or die (mysql_error());
$row = mysql_fetch_row($result) or die(mysql_error());
$notvdb=0;
if ($row[0] == 0) {
	$notvdb=1;
} else if ($row[0] == 1) {
	$notvdb=0;
}
$sql = "UPDATE recording_shows set nottvdb=\"$notvdb\" where id=\"$id\"";
$result = mysql_query($sql,$connect) or die (mysql_error());
if ($notvdb == 1) {
	echo "This show will no longer use tvdb";
} else {
	echo "We will include this show in the tvdb work";
}
?>
